<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="../common.jsp"%>
<%@ page import="cn.firstsoft.firstframe.admin.PropertyFile"%>
<%@ page import="org.springside.core.Constants" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>管理控制台 - 环境设置 - RTX设置</title>
<%@ include file="/common/meta2.jsp"%>
<link href="../style.css" type="text/css" rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<script type="text/javascript" language="javascript">
	function checkTest() {
		if (document.testForm.receiver.value == '') {
			alert("接受者不能为空！");
			return false;
		}
		return true;
	}
	
	function checkRtx() {
		if (document.rtxForm.rtx_server.value == '') {
			alert("RTX Server地址不能为空！");
			return false;
		}
		if (document.rtxForm.rtx_port.value == '') {
			alert("RTX SERVER端口不能为空！");
			return false;
		}
		if (document.rtxForm.rtx_httpserver.value == '') {
			alert("RTX HttpServer地址及端口不能为空！");
			return false;
		}
		return true;
	}	
</script>
<%
String rtx = PropertyFile.readValue("firstframe.properties","plugins.rtx")==null?"":PropertyFile.readValue("firstframe.properties","plugins.rtx");
String rtx_httpserver = PropertyFile.readValue("firstframe.properties","plugins.rtx_httpserver")==null?"":PropertyFile.readValue("firstframe.properties","plugins.rtx_httpserver");
String rtx_port = PropertyFile.readValue("firstframe.properties","plugins.rtx_port")==null?"":PropertyFile.readValue("firstframe.properties","plugins.rtx_port");
String rtx_server = PropertyFile.readValue("firstframe.properties","plugins.rtx_server")==null?"":PropertyFile.readValue("firstframe.properties","plugins.rtx_server");
%>

<FORM method="post" name="rtxForm" action="rtx_set.jsp" onsubmit="return checkRtx();">
	<table width="100%" align="center" >
		<TR>
			  <TH class=listViewPaginationTdS1  align=left colSpan=4>
			   RTX设置(括号内的表示当前内存值,输入框中为文件值)</TH></TR>
		<TR>
		<tr>
			<td class=dataLabel width="30%" align="right">是否集成了RTX：</td>
			<td width="2%">(<%="true".equals(Constants.RTX)?"是":"否"%>)</td>
			<td class=dataField width="10%">
				<INPUT type="radio" name="rtx" value="true" <%="true".equals(rtx)?"checked":""%>/>是

				<INPUT type="radio" name="rtx" value="false" <%=!"true".equals(rtx)?"checked":""%>/>否

			</td>
			<td align="left">是否集成RTX</td>
		</tr>
		<tr>
			<td class=dataLabel width="30%" align="right">RTX Server地址：</td>
			<td width="2%">(<%=Constants.RTX_SERVER%>)</td>
			<td class=dataField><INPUT type="text" name="rtx_server" value="<%=rtx_server%>" /></td>
			<td align="left">通过RTX服务器地址及端口，获得用户状态</td>
		</tr>
		<tr>
			<td class=dataLabel width="30%" align="right">RTX SERVER端口：</td>
			<td width="2%">(<%=Constants.RTX_PORT%>)</td>
			<td class=dataField><INPUT type="text" name="rtx_port" value="<%=rtx_port%>" maxlength="20"/></td>
			<td align="left">通过RTX服务器地址及端口，获得用户状态</td>
		</tr>
		<tr>
			<td class=dataLabel width="30%" align="right">RTX HttpServer地址及端口：</td>
			<td width="2%">(<%=Constants.RTX_HTTPSERVER%>)</td>
			<td class=dataField><INPUT type="text" name="rtx_httpserver" value="<%=rtx_httpserver%>" /></td>
			<td align="left">此设置主要用于使用WEB方式发送消息到RTX服务器</td>
		</tr>	
		<tr>
			<td></td>
			<td></td>
			<td>
				<input class=button type=submit value="&nbsp;提&nbsp;&nbsp;交&nbsp;" />
				<input class=button type=reset value="&nbsp;重&nbsp;&nbsp;置&nbsp;" />
			</td>
			<td></td>
		</tr>				
	</table>
</FORM>
<FORM method="post" name="testForm" action="rtx_test.jsp" onsubmit="return checkTest();">
	<table width="100%" align="center" >
		<TR>
			  <TH class=listViewPaginationTdS1  align=left colSpan=4>
			   RTX测试</TH></TR>
		<TR>
		<TR>
			<td width="100%">
				影响RTX正常使用的主要设置在RTX的服务器上，RTX服务器会检查是否允许OA服务器的IP地址或者域名向其发送消息！限制设置在RTX服务器的RTXServer\SDKProperty.xml文件中

			</td>
		<TR>
		<TR>
			<td width="100%">
				当前设置：<br>
				RTX Server地址：<%=Constants.RTX_SERVER%><br>
				RTX SERVER端口：<%=Constants.RTX_PORT%><br>
				RTX HttpServer地址及端口：<%=Constants.RTX_HTTPSERVER%><br>
				测试程序将向接收者发送一条内容为”RTX测试“的通知消息
			</td>
		<TR>		
		<TR>
			<td width="100%">
				RTX接收者：<input type="text" name="receiver" value=""> <input type="submit" name="subt" value="测试链接">
			</td>
		<TR>
	</table>
</FORM>
</body>
</html>
